import { buildService, assManageService } from '../../helper/service'

// 值类型为String或Object,String为url(method),Object同axios(config)参数支持相同,data和params只能为对象类型
const settings = {
  getResTree: {//项目设计与分解-查看wbs树形结构
    url: '/api/v1/project_resolve/get_resolve_tree',
    method: 'get'
  },
  //项目设计与分解-查看wbs结构
  getResWbs: {
    url: '/api/v1/project_resolve/get_resolve_wbs',
    method: 'get'
  },
  //项目设计与分解-导入
  importChart: {
    url: '/api/v1/project_resolve/import',
    method: 'post'
  },
  getWbsDesPaperList: {//项目设计与分解-查看设计图纸列表(1.1.5改)
    // url: '/api/v1/paper/get_wbs_design_paper_list',
    url: '/api/v1/paper/get_design_paper_list',
    method: 'get'
  },
  editResolve: {//项目设计与分解-修改楼层
    url: '/api/v1/project_resolve/edit_resolve',
    method: 'put'
  },
  delResolve: {//项目设计与分解-删除楼层
    url: '/api/v1/project_resolve/del_resolve',
    method: 'delete'
  },
  getDesignInfo: {//项目设计与分解-查看设计信息
    url: '/api/v1/project_resolve/get_resolve_wbs_design_info',
    method: 'get'
  },
  editDesignInfo: {//项目设计与分解-编辑设计信息
    url: '/api/v1/project_resolve/edit_resolve_wbs_design',
    method: 'put'
  }
}

const assSettings = {
  getCompProjectRela: {//项目设计与分解-查看构件清单列表
    url: '/api/admin/get_component_step_list_by_project_rela',
    method: 'get'
  },
  //构件详情
  getComDataDetail: {
    url: '/api/admin/component_step',
    method: 'get',
    type: 'restful'
  },
}
export default { ...buildService(settings), ...assManageService(assSettings) };
